<?php

namespace mpend\modules\home\controllers;

use Yii;
use mpend\components\Controller;
use mpend\modules\home\models\DashboardLogic;

/**
 * Default interface of APP home page 
 * 
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
class DefaultController extends Controller {

    /**
     * @inheritdoc
     */
    public $modelClass = DashboardLogic::class;

    /**
     * @inheritdoc
     */
    protected function verbs() {
        return [
            '*' => ['GET']
        ];
    }

    /**
     * @inheritdoc
     */
    public function actionIndex() {
        /* @var $model DashboardLogic */
        $model = new $this->modelClass;
        $model->setToken($this->token);
        return $model->toArray();
    }

}
